package com.luck.emp.entity;

import java.util.Date;

import com.luck.org.entity.VDepartment;
import com.luck.org.entity.VUser;
import com.luck.pf.util.DateUtil;
import com.luck.pf.util.FormateUtil;

/**
 * 说明:ENEITY类
 * Copyright: Copyright (c) 2011
 * 深圳**科技
 * @author 
 * 
 */
public class EmpTWhOrderM implements java.io.Serializable {
		/**
		 * pk
		 * 订单编码
		 **/
		String orderCode;
		/**
		 * 单据类型：采购单，调拨单等
		 **/
		String billType;
		/**
		 * 订单状态
		 **/
		String status;
		/**
		 * 订单紧急程度：1－99，数字越大紧急程度越高。
		 **/
		Long urgent;
		/**
		 * 出入库机构
		 **/
		Long ioDeptId;
		VDepartment dept;
		/**
		 * 来源单号(销售单等)
		 **/
		String receiptNo;
		/**
		 * 仓库编码
		 **/
		String whCode;
		EmpTWarehouse wh;;
		/**
		 * 供应商编码
		 **/
		String vendorCode;
		EmpTVendor vendor;
		Long salemanId;
		EmpTSalesman saleman;
		/**
		 * 收件人
		 **/
		String contact;
		/**
		 * 联系电话
		 **/
		String tel;
		/**
		 * 地址
		 **/
		String contactAddr;
		/**
		 * 整单价值
		 **/
		Double orderCost;
		/**
		 * 备注
		 **/
		String note;
		/**
		 * 受理人
		 **/
		Long maker;
		/**
		 * 审核时间
		 **/
		Date auditDate;
		/**
		 * 审核人
		 **/
		VUser auditor;
		/**
		 * 审核备注
		 **/
		String auditMemo;
		/**
		 * 出入库类型：p_inout_type
		 **/
		String ioType;
		/**
		 * 创建人
		 **/
		private VUser createUser;
		/**
		 * 创建时间
		 **/
		Date createDate;
		/**
		 * 修改人
		 **/
		private VUser modiUser;
		/**
		 * 修改时间
		 **/
		Date modiDate;
		/**
		 * 出入库：1－出库； 2－入库
		 **/
		String ioKind;
		/**
		 * 渠道p_channel_type,1:普通销售2:网络销售3:淘宝4:京东
		 **/
		String channelType;
		/**
		 * 客户信息
		 **/
		Long custInfoId;
		EmpTCustInfo cust;
		/**
		 * 相应详情单
		 **/
		Long expressNo;
		/**
		 * 邮费
		 **/
		Double postage;
	
	public EmpTWhOrderM(){
	}
	
		public String getOrderCode(){
			return this.orderCode;
		}		
		public void setOrderCode(String orderCode){
			this.orderCode = orderCode;
		}
		public String getBillType(){
			return this.billType;
		}		
		public void setBillType(String billType){
			this.billType = billType;
		}
		public String getStatus(){
			return this.status;
		}		
		public void setStatus(String status){
			this.status = status;
		}
		public Long getUrgent(){
			return this.urgent;
		}		
		public void setUrgent(Long urgent){
			this.urgent = urgent;
		}
		public Long getIoDeptId(){
			return this.ioDeptId;
		}		
		public void setIoDeptId(Long ioDeptId){
			this.ioDeptId = ioDeptId;
		}
		public String getReceiptNo(){
			return this.receiptNo;
		}		
		public void setReceiptNo(String receiptNo){
			this.receiptNo = receiptNo;
		}
		public String getWhCode(){
			return this.whCode;
		}		
		public void setWhCode(String whCode){
			this.whCode = whCode;
		}
		public String getVendorCode(){
			return this.vendorCode;
		}		
		public void setVendorCode(String vendorCode){
			this.vendorCode = vendorCode;
		}
		public String getContact(){
			return this.contact;
		}		
		public void setContact(String contact){
			this.contact = contact;
		}
		public String getTel(){
			return this.tel;
		}		
		public void setTel(String tel){
			this.tel = tel;
		}
		public String getContactAddr(){
			return this.contactAddr;
		}		
		public void setContactAddr(String contactAddr){
			this.contactAddr = contactAddr;
		}
		public Double getOrderCost(){
			return this.orderCost;
		}		
		public void setOrderCost(Double orderCost){
			this.orderCost = orderCost;
		}
		public String getNote(){
			return this.note;
		}		
		public void setNote(String note){
			this.note = note;
		}
		public Long getMaker(){
			return this.maker;
		}		
		public void setMaker(Long maker){
			this.maker = maker;
		}
		public Date getAuditDate(){
			return this.auditDate;
		}		
		public void setAuditDate(Date auditDate){
			this.auditDate = auditDate;
		}

		public String getAuditMemo(){
			return this.auditMemo;
		}		
		public void setAuditMemo(String auditMemo){
			this.auditMemo = auditMemo;
		}
		public String getIoType(){
			return this.ioType;
		}		
		public void setIoType(String ioType){
			this.ioType = ioType;
		}

		public Date getCreateDate(){
			return this.createDate;
		}		
		public void setCreateDate(Date createDate){
			this.createDate = createDate;
		}

		public Date getModiDate(){
			return this.modiDate;
		}		
		public void setModiDate(Date modiDate){
			this.modiDate = modiDate;
		}
		public String getIoKind(){
			return this.ioKind;
		}		
		public void setIoKind(String ioKind){
			this.ioKind = ioKind;
		}
		public String getChannelType(){
			return this.channelType;
		}		
		public void setChannelType(String channelType){
			this.channelType = channelType;
		}
		public Long getCustInfoId(){
			return this.custInfoId;
		}		
		public void setCustInfoId(Long custInfoId){
			this.custInfoId = custInfoId;
		}
		public Long getExpressNo(){
			return this.expressNo;
		}		
		public void setExpressNo(Long expressNo){
			this.expressNo = expressNo;
		}
		public Double getPostage(){
			return this.postage;
		}		
		public void setPostage(Double postage){
			this.postage = postage;
		}
	
		public EmpTWarehouse getWh() {
			return wh;
		}

		public void setWh(EmpTWarehouse wh) {
			this.wh = wh;
		}

		public EmpTVendor getVendor() {
			return vendor;
		}

		public void setVendor(EmpTVendor vendor) {
			this.vendor = vendor;
		}

		public VUser getAuditor() {
			return auditor;
		}

		public void setAuditor(VUser auditor) {
			this.auditor = auditor;
		}

		public VUser getCreateUser() {
			return createUser;
		}

		public void setCreateUser(VUser createUser) {
			this.createUser = createUser;
		}

		public VUser getModiUser() {
			return modiUser;
		}

		public void setModiUser(VUser modiUser) {
			this.modiUser = modiUser;
		}

		public String getOrderCostStr(){
			return FormateUtil.getInstance().formateDouble(this.orderCost);
		}
		public String getAuditDateStr(){
			return DateUtil.dateToString(this.auditDate,DateUtil.patternE);
		}
		public String getCreateDateStr(){
			return DateUtil.dateToString(this.createDate,DateUtil.patternE);
		}
		public String getModiDateStr(){
			return DateUtil.dateToString(this.modiDate,DateUtil.patternE);
		}
		public String getPostageStr(){
			return FormateUtil.getInstance().formateDouble(this.postage);
		}

		public VDepartment getDept() {
			return dept;
		}

		public void setDept(VDepartment dept) {
			this.dept = dept;
		}

		public Long getSalemanId() {
			return salemanId;
		}

		public void setSalemanId(Long salemanId) {
			this.salemanId = salemanId;
		}

		public EmpTSalesman getSaleman() {
			return saleman;
		}

		public void setSaleman(EmpTSalesman saleman) {
			this.saleman = saleman;
		}

		public EmpTCustInfo getCust() {
			return cust;
		}

		public void setCust(EmpTCustInfo cust) {
			this.cust = cust;
		}

		public String getChannelTypeStr(){
			return FormateUtil.getInstance().getNameByCode("p_channel_type", this.channelType);
		}	
		public String getStatusStr(){
			return FormateUtil.getInstance().getNameByCode("p_wh_order_status", this.status);
		}	
		public String getIoTypeStr(){
			return FormateUtil.getInstance().getNameByCode("p_inout_type", this.ioType);
		}	
		public String getBillTypeStr(){
			return FormateUtil.getInstance().getNameByCode("p_bill_type", this.billType);
		}	
		public String getIoKindStr(){
			if(this.ioKind.equals("1"))
				return "出库";
			else
				return "入库";
		}		
}